package com.zz.tijian.controller;

import com.zz.tijian.entity.Setmeal;
import com.zz.tijian.entity.res.Result;
import com.zz.tijian.entity.res.SetmealVo;
import com.zz.tijian.service.SetmealService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "setmeal-套餐相关接口")
@RestController
@RequestMapping("/setmeal")
@CrossOrigin
public class SetmealController {

    @Autowired
    private SetmealService setmealService;

    @GetMapping("/getAll")
    public Result<List<SetmealVo>> getAll(){
        return setmealService.getAll();
    }

}
